<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/tld/eatrip.tld" prefix="eatrip"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script type="text/javascript" src="js/jquery-1.7.1.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
	<link rel="stylesheet" media="screen" type="text/css" href="css/redmond/jquery-ui-1.8.16.custom.css" />
    <link rel="stylesheet" media="screen" type="text/css" href="css/base.css" />
	<link rel="stylesheet" media="screen" type="text/css" href="css/footer.css" /> 
	<title>Rigistra locale</title>
</head>
<body>
	<header>
		<h1>Registre Locale</h1>
		<tiles:insertAttribute name="navmenu" />
	</header>
	<div id="container">
		<div id="left-container"></div>
		<div id="right-container"></div>
		<div id="center-container">
			<form:form action="registra-locale" method="post" commandName="datiLocale">
				<fieldset>
					<legend>Dati Locale</legend>
					<div id="dati-locale">
						<table>
							<tr>
								<th><label>Nome Locale *</label></th>
								<th>
									<spring:bind path="datiLocale.nomeLocale">
										<input name="nomeLocale" maxlength="50" required="required" />
									</spring:bind>
								</th>
							</tr>
							<tr>
								<th><label>Email *</label></th>
								<th>
									<spring:bind path="datiLocale.email">
										<input type="email" name="email" required="required" />
									</spring:bind>
								</th>
							</tr>
							<tr>
								<th><label>Descrizione</label></th>
								<th>
									<spring:bind path="datiLocale.descrizione">
										<textarea name="descrizione" cols="50" rows="4" maxlength="500"></textarea>
									</spring:bind>
								</th>
							</tr>
							<tr>
								<th><label>Tipo Locale</label></th>
								<th>
									<spring:bind path="datiLocale.tipoLocale.id">
										<select name="tipoLocale">
											<option value="1">Ristorante</option>
											<option value="2">Ristorante / Pizzeria</option>
											<option value="3">Ristorante / Albergo</option>
											<option value="4">Ristorante Etnico</option>
											<option value="5">Trattoria / Osteria</option>
											<option value="6">Agriturismo</option>
											<option value="7">Pub</option>
										</select>
									</spring:bind>
								</th>
							</tr>
							<tr>
								<th><label>Indirizzo</label></th>
								<th>
									<spring:bind path="datiLocale.indirizzo">
										<input type="text" name="indirizzo" />
									</spring:bind>
								</th>
							</tr>
							<tr>
								<th><label>telefono</label></th>
								<th>
									<spring:bind path="datiLocale.telefono">
										<input type="text" name="telefono" />
									</spring:bind>
								</th>
							</tr>
							<tr>
								<th><label>Sito Web</label></th>
								<th>
									<spring:bind path="datiLocale.sitoWeb">
										<input type="text" name="sitoWeb" />
									</spring:bind>
								</th>
							</tr>
							<tr>
								<th><label>Chiusura Settimanale</label></th>
								<th>
									<spring:bind path="datiLocale.chiusuraSettimanale.idGiorno">
										<select name="idGiorno">
											<option value="0"></option>
											<option value="1">Lunedi</option>
											<option value="2">Martedi</option>
											<option value="3">Mercoledi</option>
											<option value="4">Giovedi</option>
											<option value="5">Venerdi</option>
											<option value="6">Sabato</option>
											<option value="7">Domenica</option>
										</select>
									</spring:bind>
								</th>
							</tr>
							<tr>
								<th><label>Fascia Prezzo</label></th>
								<th>
									<spring:bind path="datiLocale.fasciaPrezzo.idFasciaPrezzo">
										<select name="idFasciaPrezzo">
											<option value="0">Non Definito</option>
											<option value="1">Da 10 euro a 15 euro</option>
											<option value="2">Da 15 euro a 20 euro</option>
											<option value="3">Da 20 euro a 25 euro</option>
									    </select>
								    </spring:bind>
							  	</th>
						    </tr>
						</table>
					</div>
				</fieldset>
				<fieldset>
					<legend>Dettagli Locale</legend>
						<div id="dettagli-locale">
							<table>
								<tr>
									<th><label>ricevimenti</label></th>
									<th>
										<spring:bind path="dettagliLocale.ricevimenti">
											<input type="checkbox" name="ricevimenti" />	
										</spring:bind>
									</th>
									<th><span>Sky-Mediaset</span></th>
									<th>
										<spring:bind path="dettagliLocale.skyMediaset">
											<input type="checkbox" name="skyMediaset" />
										</spring:bind>
									</th>
									<th><span>Parcheggio</span></th>
									<th>
										<spring:bind path="dettagliLocale.parcheggio">
											<input type="checkbox" name="parcheggio" />
										</spring:bind>	
									</th>
									<th><span>All'aperto</span></th>
									<th>
										<spring:bind path="dettagliLocale.allAperto">
											<input type="checkbox" name="allAperto" />
										</spring:bind>
									</th>
								</tr>
								<tr>
									<th><span>Celiaci</span></th>
									<th>
										<spring:bind path="dettagliLocale.celiaci">
											<input type="checkbox" name="celiaci" />
										</spring:bind>
									</th>
									<th><span>Live Music</span></th>
									<th>
										<spring:bind path="dettagliLocale.musicaDalVivo">
											<input type="checkbox" name="musicaDalVivo" />
										</spring:bind>
									</th>
									<th><span>Vista Mare</span></th>
									<th>
										<spring:bind path="dettagliLocale.vistaMare">
											<input type="checkbox" name="vistaMare" />
										</spring:bind>
									</th>
									<th><span>Sala Fumatori</span></th>
									<th>
										<spring:bind path="dettagliLocale.salaFumatori">
											<input type="checkbox" name="salaFumatori" />
										</spring:bind>
									</th>
								</tr>
								<tr>
									<th><span>Animali</span></th>
									<th>
										<spring:bind path="dettagliLocale.animali">
											<input type="checkbox" name="animali" />
										</spring:bind>
									</th>
									<th><span>Wifi</span></th>
									<th>
										<spring:bind path="dettagliLocale.wifi">
											<input type="checkbox" name="wifi" />
										</spring:bind>
									</th>
									<th><span>Da Asporto</span></th>
									<th>
										<spring:bind path="dettagliLocale.daAsporto">
											<input type="checkbox" name="daAsporto" />
										</spring:bind>
									</th>
									<th><span>Cucina Tipica</span></th>
									<th>
										<spring:bind path="dettagliLocale.cucinaTipica">
											<input type="checkbox" name="cucinaTipica" />
										</spring:bind>
									</th>
								</tr>
							</table>
						</div>
					</fieldset>	
				<input type="submit" value="Registra" />  
			</form:form>
		</div>
		<div id="push-footer"></div>
		<tiles:insertAttribute name="footer" />
	</div>

</body>
</html>